<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>双开门案例</title>
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    .father {
      display: flex;
      margin: 0 auto; 
      width: 1366px;
      height: 600px;
      background-image: url(../../images/bg.jpg);
      overflow: hidden;
    }

    .father .left,
    .father .right {
      width: 50%;
      height: 600px;
      background-image: url(../../images/fm.jpg);
      transition: all 0.5s;
    }

    .father .right {
      background: url(../../images/fm.jpg);

      /* right 表示取到精灵图右边的图片 */
      background-position: right 0;
    }

    /* 鼠标悬停效果 左右移动 */
    .father:hover .left {
      transform: translateX(-100%);
    }

    .father:hover .right {
      transform: translateX(100%);
    }
  </style>
</head>

<body>
  <div class="father">
    <div class="left"></div>
    <div class="right"></div>
  </div>
</body>

</html>